package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabInspectCompany;
import com.ysd.lis.request.lab.CompanyPageParam;
import com.ysd.lis.request.lab.InspectCompanyDto;
import com.ysd.lis.service.lab.LabInspectCompanyService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 通道号管理表 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-01-26
 */
@RestController
@RequestMapping("/lab/inspectCompany")
public class LabInspectCompanyController extends BaseController {


    @Autowired
    LabInspectCompanyService labInspectCompanyService;

    @ApiOperation("分页查询")
    @GetMapping("/findInspectCompanyPageList")
    public Result findInspectCompanyPageList(CompanyPageParam pageParam){
        return labInspectCompanyService.findInspectCompanyPageList(pageParam);
    }

    @ApiOperation("查询")
    @GetMapping("/findInspectCompanyList")
    public Result findInspectCompanyList(CompanyPageParam pageParam){
        return labInspectCompanyService.findInspectCompanyList(pageParam);
    }


    @ApiOperation("新增")
    @PostMapping("/addInspectCompany")
    public Result addInspectCompany(@RequestBody LabInspectCompany company){
        return  labInspectCompanyService.addInspectCompany(company);
    }

    @ApiOperation("修改")
    @PostMapping("/editInspectCompany")
    public Result editInspectCompany(@RequestBody LabInspectCompany company) {
        return labInspectCompanyService.editInspectCompany(company);
    }



    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInspectCompanys")
    public Result batchDeleteInspectCompanys(@RequestBody InspectCompanyDto dto){
        return  labInspectCompanyService.batchDeleteInspectCompanys(dto);
    }

    @ApiOperation("查询")
    @GetMapping("/findInspectCompanysByPendSettle")
    public Result findInspectCompanysByPendSettle(CompanyPageParam pageParam){
        return labInspectCompanyService.findInspectCompanysByPendSettle(pageParam);
    }

    @ApiOperation("关联销售人员查询")
    @GetMapping("/findCompanyBySalesmanList")
    public Result findCompanyBySalesmanList(CompanyPageParam pageParam) {
        return labInspectCompanyService.findCompanyBySalesmanList(pageParam);
    }
}
